#pragma once

#include "execute.h"

struct SUndoNode {
	SUndoNode* _parent;
	SUndoNode* _next;
	SUndoNode* _slibing;

	CExecute* _exc;
};

class CUndoTree {
public:
	CUndoTree();
	~CUndoTree();

	bool Do(CExecute* execution);
	bool Undo();
	int GetRedoChoicesNum();
	const CExecute* GetRedoChoice(int choice);
	int Redo(int choice);

private:
	SUndoNode* m_Head;
	SUndoNode* m_Current;
};
